//
//  MJBaseViewController.m
//  MJ
//
//  Created by lina on 2017/12/7.
//  Copyright © 2017年 lina. All rights reserved.
//

#import "MJBaseViewController.h"
#import <YYKit.h>


@interface MJBaseViewController ()

@end

@implementation MJBaseViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self setupCustomeNavigationBarView];
    self.navigationController.interactivePopGestureRecognizer.delegate = (id<UIGestureRecognizerDelegate>)self;
    self.hidesBottomBarWhenPushed = YES;
    self.navigationController.navigationBarHidden = YES;

}

#pragma mark - 导航栏
- (void)setupCustomeNavigationBarView{
    
    
    self.view.backgroundColor = HEXColor(@"f2f2f2");
    self.navigationController.navigationBarHidden = NO;
    CGRect frame = self.navigationController.navigationBar.frame;
    self.navigationController.navigationBarHidden = YES;
    _navgationBar = [[TJCustomeNavgationBar alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, frame.origin.y+44)];
    self.navgationBar.backgroundColor = HEXColor(@"#ff8280");
    _navgationBar.titleLabel.text = @"";
    [self.view addSubview:_navgationBar];
    self.navgationBar.hidden = NO;
    [self.navgationBar.leftNavigatoinItem addTarget:self action:@selector(back) forControlEvents:UIControlEventTouchUpInside];

}

- (void)back{
    
    [self.navigationController popViewControllerAnimated:YES];
}

-(UIStatusBarStyle)preferredStatusBarStyle{
    return UIStatusBarStyleLightContent;
}

@end
